package com.neusoft.controller.physician;

import com.neusoft.service.DrugService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Slf4j
@RestController
@CrossOrigin
@RequestMapping("/drugs")
public class DrugController {
    @Autowired
    DrugService drugService;

    @GetMapping("/searchDrug")
    public List<Map<String,Object>> searchDrug(String drug_name, String mnemonic_code){
        return drugService.searchDrug(drug_name, mnemonic_code);
    }

}
